import { Button, Form, Input, Modal, Select, Switch } from 'antd'
import React from 'react'

function FormBox({ title, show, gb, form, onFinish }) {


    return (
        <div>
            <Modal
                title={title}
                open={show}
                onCancel={gb}
                footer={null}
            >
                <Form form={form} onFinish={onFinish}>
                    <Form.Item hidden name={'id'} label='id'>
                        <Input></Input>
                    </Form.Item>

                    <Form.Item name={'name'} label='姓名'>
                        <Input></Input>
                    </Form.Item>
                    <Form.Item name={'job'} label='职位'>
                        <Select>
                            <Select.Option value='总经理'>总经理</Select.Option>
                            <Select.Option value='销售助理'>销售助理</Select.Option>
                            <Select.Option value='销售员'>销售员</Select.Option>
                        </Select>
                    </Form.Item>
                    <Form.Item name={'type'} label='职位状态'>
                        <Select>
                            <Select.Option value='实习生'>实习生</Select.Option>
                            <Select.Option value='正式员工'>正式员工</Select.Option>
                        </Select>
                    </Form.Item>
                    <Form.Item name={'schema_name'} label='公司'>
                        <Select>
                            <Select.Option value='北京分公司'>北京分公司</Select.Option>
                            <Select.Option value='上海分公司'>上海分公司</Select.Option>
                            <Select.Option value='浙江分公司'>浙江分公司</Select.Option>
                        </Select>
                    </Form.Item>
                    <Form.Item name={'person_num'} label='公司人数'>
                        <Input></Input>
                    </Form.Item>
                    <Form.Item name={'status'} label='状态'>
                        <Switch></Switch>
                    </Form.Item>
                    <Form.Item>
                        <Button htmlType='submit'>提交</Button>
                    </Form.Item>
                </Form>
            </Modal>

        </div>
    )
}

export default React.memo(FormBox)
